#!/bin/bash -e

set -x

true
true binarization
true

rm -rf temp 
ocropus-nlbin tests/testpage.png -o temp

true
true page level segmentation
true

ocropus-gpageseg 'temp/????.bin.png'

true
true raw text line recognition
true

ocropus-lattices --writebestpath 'temp/????/??????.bin.png'

true
true language model application
true

ocropus-ngraphs 'temp/????/??????.lattice'

true
true create hOCR output
true

ocropus-hocr 'temp/????.bin.png' -o temp.html

true
true 'create HTML for debugging (use "firefox temp/index.html" to view)'
true

ocropus-visualize-results temp

true
true "to see recognition results, type: firefox temp.html"
true "to see details on the recognition process, type: firefox temp/index.html"
true
